<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>订单提交中心</title>
<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE?>/css/pay.css"/>
<script type="text/javascript" src="<?php echo TEMPLATE?>/jquery/jquery-1.7.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="Public/hdjs/hdjs.css"/>
<script src="Public/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="<?php echo TEMPLATE?>/javascript/pay.js"></script>
<script language="javascript" src="<?php echo TEMPLATE?>/javascript/area.js"></script>
</head>

<body>
	<!--顶部导航-->
	<div id="top_nav">
		<div class="top_ad_center">
			<div class="num1">
				<a href="<?php echo U('Index/index')?>">时尚商城</a>
			</div>

			<!--右侧-->
			<div class="top_ad_right">
				<?php if(isset($_SESSION['username'])){?>
                
					<div class="top_ad_right1">
						<span>您好，<?php echo substr($_SESSION['username'],0,-7)?></span>
						<a href="<?php echo U('Public/out')?>" style="color: #666666;" class="out">退出登录</a>
					</div>
				<?php }else{?>
					<div class="top_ad_right1">
						<a href="<?php echo U('Public/login')?>">登陆</a>
						<a href="<?php echo U('Public/reg')?>">注册</a>
					</div>
				
               <?php }?>
				<div class="top_ad_right2">
					<?php if(isset($_SESSION['username'])){?>
                
						<a href="<?php echo U('MineYG/index')?>">我的优购</a>
					<?php }else{?>
						<a href="<?php echo U('Public/login')?>">我的优购</a>
					
               <?php }?>	
				</div>
				<div class="top_ad_right2">
					<?php if(isset($_SESSION['username'])){?>
                
						<a href="<?php echo U('MineYG/order')?>">我的订单</a>
					<?php }else{?>
						<a href="<?php echo U('Public/login')?>">我的订单</a>
					
               <?php }?>
				</div>
			</div>
			<!--右侧结束-->
		</div>		
	</div>
<!--顶部导航结束-->
<!--logo区域-->
<div id="shop_logo">
	<div class="shop_logo1">
		<a href="<?php echo U('Index/index')?>"><img src="<?php echo TEMPLATE?>/images/shop_logo1.png" alt="" /></a>
	</div>
	<div class="shop_logo_right">
		<ul>
			<li class="current">我的购物车<em></em><i></i></li>
			<li class="current1">提交订单中心<em></em><i></i></li>
			<li>成功提交订单</li>
		</ul>
	</div>
</div>
<!--logo区域结束-->
<!--收货地址区域-->
<form action="<?php echo U('OrderLSuccess/add')?>" method="post">
	<div class="address">
		<div class="address_top">
			<h2>请选择您的收货地址</h2>
			<span class="address_top1"><a href="<?php echo U('MyCart/index')?>" >返回购物车</a></span>
			<span class="address_top2"><a href="<?php echo U('MineYG/address')?>" >管理收货地址</a></span>
		</div>		
		
		
		<div class="address_bottom">
			
			<?php foreach ($useraddress as $k=>$v){?>
				<?php if($k==0){?>
                
					<dl class="address_bottom1 backg">
						<i class="address_bottom11 right"></i>
						<p class="actP">
							<a href="<?php echo U('OrderL/edit',array('uaid'=>$v['uaid']))?>">修改</a> |
							<a href="javascript:hd_modal_del(<?php echo $v['uaid']?>);" class="shanchu" UAID="<?php echo $v['uaid']?>">删除</a>
						</p>
						<dt><span class="area"><?php echo $v['uaaddress']?></span><span>(<span class="shouhuoren"><?php echo $v['uaname']?></span>  收)</span></dt>
						<dd>
							<p><em class="xxdizhi"><?php echo $v['uaxxaddress']?></em>  <em class="dianhua"> <?php echo $v['uaphonenumber']?></em></p>
							<p class="time">送货时间:<span><?php echo $v['uatimer']?></span></p>
						</dd>
					</dl>
				<?php }else{?>
					<dl class="address_bottom1">
						<i class="address_bottom11"></i>
						<p class="actP">
							<a href="<?php echo U('OrderL/edit',array('uaid'=>$v['uaid']))?>">修改</a> |
							<a href="javascript:hd_modal_del(<?php echo $v['uaid']?>);" class="shanchu" UAID="<?php echo $v['uaid']?>">删除</a>
						</p>
						<dt><span class="area"><?php echo $v['uaaddress']?></span><span>(<span class="shouhuoren"><?php echo $v['uaname']?></span>  收)</span></dt>
						<dd>
							<p><em class="xxdizhi"><?php echo $v['uaxxaddress']?></em>  <em class="dianhua"> <?php echo $v['uaphonenumber']?></em></p>
							<p class="time">送货时间:<span><?php echo $v['uatimer']?></span></p>
						</dd>
					</dl>
				
               <?php }?>
			<?php }?>
			<dl class="address_bottom3">
				<dd><i>+</i>使用新地址</dd>									
			</dl>
		</div>
		<!--用来存放我当前选中的地址,默认是存的是第一个(被选中的那个)-->
		<!--收货人-->
		<input type="hidden" name="consignee" value="<?php echo $useraddress[0]['uaname']?>" class="hiddenCon"/>
		<!--电话-->
		<input type="hidden" name="olphonenumber" value="<?php echo $useraddress[0]['uaphonenumber']?>" class="hiddenPhone"/>
		<!--详细地址-->
		<input type="hidden" name="address" value="<?php echo $useraddress[0]['uaaddress']?><?php echo $useraddress[0]['uaxxaddress']?>" class="hidenAddress"/>
		<!--订单备注(送货时间)-->
		<input type="hidden" name="remark" value="<?php echo $useraddress[0]['uatimer']?>" class="hidenRemark"/>
	</div>
	

<!--收货地址结束-->
<!--确认提交订单信息-->
<div class="sure">
	<div class="sure1">
		<h2>确认订单信息</h2>
	</div>
	<div class="sure2">
		<table border="0" cellspacing="" cellpadding="">
			<colgroup>
				<col width="400"/>
				<col width="110"/>
				<col width="130"/>
				<col width="130"/>
				<col width="175"/>
			</colgroup>
			<thead>
				<tr>
					<th>商品名称</th>
					<th>颜色尺码</th>
					<th>单价</th>
					<th>数量</th>
					<th>小计(元)</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td colspan="5">
						<?php if(isset($_SESSION['ORDERL'])){?>
                
						<?php foreach ($_SESSION['ORDERL']['ord'] as $k=>$v){?>
							<div class="sure21"></div>
							<div class="sure22">
								<dl>
									<dt><a href="<?php echo U('Content/index',array('gid'=>$v['shangpin']['gid']))?>" title="<?php echo $v['shangpin']['gname']?>"><img src="<?php echo $v['shangpin']['pic']?>" alt="" /></a></dt>
									<dd class="sure221"><a href="<?php echo U('Content/index',array('gid'=>$v['shangpin']['gid']))?>" title="<?php echo $v['shangpin']['gname']?>"><?php echo $v['shangpin']['gname']?></a></dd>
									<dd class="sure222">
										<div class="sure2221">
											<p>颜色：<em><?php echo $v['options']['color']?></em></p>
											<p>尺码：<em><?php echo $v['options']['size']?></em></p>
										</div>
									</dd>
									<dd class="sure223"><?php echo $v['price']?></dd>
									<dd class="sure224"><?php echo $v['num']?></dd>
									<dd class="sure225"><?php echo $v['total']?></dd>
								</dl>
								<div class="sure226"></div>															
							</div>					
						<?php }?>
						
               <?php }?>
					</td>
				</tr>
			</tbody>
		</table>
		<?php if(isset($_SESSION['ORDERL'])){?>
                
		<div class="sure23">
			<div class="sure22_right">
				<table border="0" cellspacing="" cellpadding="">
					<colgroup>
						<col />
						<col />
					</colgroup>
					<tbody>
						
						<tr><th><strong>商品总金额：</strong></th><td><strong><?php echo $_SESSION['ORDERL']['total']?></strong></td></tr>
						
					</tbody>
				</table>
			</div>
		</div>
		<div class="sure_order">
			<p>
				<a href="<?php echo U('MyCart/index')?>">返回购物车</a>
				<input type="submit" name="" id="" value="确认，提交订单"/>
			</p>
		</div>
	</div>
	
               <?php }?>
</div>

</form>

<!--确认订单提交信息结束-->
<div class="shop_baozheng">
	<div class="shop_baozheng_right">
		<p>购物保障：<i>&nbsp;</i>100%正品<i>&nbsp;&nbsp;</i>10天退换货<i>&nbsp;&nbsp;</i>10天补差价</p>
		<p>优惠券/礼品卡在下一步使用</p>
		<p>帮助我们改进购物流程</p>
	</div>
	
</div>	
<!--底部-->
<div class="footer">
	<p>Copyright © 2011-2014 Yougou Technology Co., Ltd. 
		&nbsp;&nbsp;<a href="javascript:;">粤ICP备09070608号-4 </a>&nbsp;&nbsp;增值电信业务经营许可证：
		<a href="javascript:;">粤 B2-20090203</a> </p>
</div>
<form action="<?php echo U('OrderL/add')?>" method="post">
	<!--点击使用新地址弹出模态框-->
<div class="newAdress">
	<div class="newAdress_center">
		<div class="newAdress_center1">
			<p class="newAdress_center11">使用新地址</p>
			<p class="newAdress_center12">关闭<span>X</span></p>
		</div>
		
			<div class="newAdress_center2">
				<table border="0" cellspacing="" cellpadding="">
					<tbody>
						<tr>
							<td class="tdleft">收货人姓名<i>*</i></td>
							<td>
								<input type="text" name="uaname" id="" value="" class="minput"/>
								<span>（请使用真实姓名，不能全部是数字/英文/包含特殊符号（括号、井号等））</span>
							</td>
						</tr>
						<tr>
							<td class="tdleft">收货人地址<i>*</i></td>
							<td>
								<select id="area1" name="uaaddress[]">
								</select>
								<select id="area2" name="uaaddress[]">
								</select>
								<select id="area3" name="uaaddress[]">
								</select>
							</td>
						</tr>
						<tr>
							<td></td>
							<td>
								<input type="text" name="uaxxaddress" maxlength="60" style="width: 250px;" class="linput"/>
								<span class="receivingAddress_tips">（请填写详细地址，确保准确送达）</span>
							</td>
						</tr>
						<tr>
							<td class="tdleft">收货人手机<i>*</i></td>
							<td>
								<input type="text" name="uaphonenumber"/>
							</td>
						</tr>
						<tr>
							<td class="tdleft">收货时间<i>*</i></td>
							<td>
								<select name="uatimer" class="delivery_time">
									<option value="不限时间">不限时间</option>
									<option value="周一至周五">周一至周五</option>
									<option value="周六日/节假日">周六日/节假日</option>
								</select>
								<span>（送货时间仅供参考，快递公司会尽量满足您的要求）</span>
							</td>
						</tr>
						<tr>
							<td></td>
							<td style="padding-top:20px;">
								<input type="submit" name="" class="subBtn" value="确认保存"/>
								<input type="button" name="" class="cancelBtn" value="取消"/>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
			
		
	</div>
</div>
	
	
</form>

</body>
	<script type="text/javascript">
		$(function(){
			//初始化方法
			area.init('area');
			//修改的时候默认被选中效果
			area.selected('请选择省','请选择市','');
		})
	</script>
<script type="text/javascript">
	function hd_modal_del(uaid) {
        hd_modal({
            width: 400,//宽度
            height: 150,//高度
            title: '确认删除吗？',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: false,//背景遮罩
            shadeOpacity: 0.4,//背景透明度
            success: function () {
            	//点击确定后的事件
            	//http://127.0.0.1/hdphp/index.php/Admin/Category&a=del&cid=id
				location.href = 'index.php?m=Home&c=OrderL&a=del&uaid=' + uaid;
            },
            cancel: function () {//点击关闭后的事件
				
            }
        });
    }
</script>
</html>
